package org.gitman.agentplatform.ui.actions;

import java.awt.event.ActionEvent;

import org.gitman.agentplatform.core.exceptions.NoGraphException;
import org.gitman.agentplatform.ui.api.View;
import org.gitman.agentplatform.ui.api.View.MessageType;

public class BothWayEdgesAction extends UIAction {

	public BothWayEdgesAction() {
		super("Make edges bidirectional");
	}
	
	@Override
	public void actionPerformed(ActionEvent e) {
		try {
			graphEditor.makeEdgesBidirectional();
		} catch (NoGraphException e1) {
			View.showMessage(e1.getMessage(), MessageType.ERROR);
			e1.printStackTrace();
		}
	}

}
